package loaders
{
	import flash.events.Event;
	import flash.net.URLRequest;
	import flash.system.ApplicationDomain;
	import flash.system.LoaderContext;
	
	import utils.StringUtils;

	public class SwfLoader extends DisplayLoader
	{
		
		public static var MainLoaderContenxt:LoaderContext = new LoaderContext(false,ApplicationDomain.currentDomain);
		public function SwfLoader(url:String, callback:Function=null,saveToDomain:Boolean = false)
		{
			super(url, callback);
		}
		
		override protected function startLoad(path:String):void
		{
			if(_isLoading)return;
			addEvent();
			_currentLoadPath = path;
			_request = new URLRequest(path);
			_isLoading = true;
			_loader.load(_request,MainLoaderContenxt);
		}
		
		override public function get type():int
		{
			return LoaderTypes.SWF_LOADER;
		}
		
		override protected function __onDataLoadComplete(event:Event):void
		{
			super.__onDataLoadComplete(event);
		}
	}
}